<!DOCTYPE html>
<html lang="zh-CN" data-theme="light">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta name="generator" content="VuePress 2.0.0-beta.51" />
    <meta name="theme" content="VuePress Theme Hope" />
    <meta property="og:url" content="https://pro.autojs.org/docs/zh/v8/dialogs.html">
    <meta property="og:site_name" content="Auto.js Pro文档">
    <meta property="og:title" content="dialogs - 对话框">
    <meta property="og:type" content="article">
    <meta property="og:updated_time" content="2022-10-22T07:36:15.000Z">
    <meta property="og:locale" content="zh-CN">
    <meta property="og:locale:alternate" content="en-US">
    <meta property="article:modified_time" content="2022-10-22T07:36:15.000Z">
    <link rel="alternate" hreflang="en-us" href="https://pro.autojs.org/docs/en/zh/v8/dialogs.html">
    <link rel="icon" href="https://pro.autojs.org/docs/favicon.ico">
    <link rel="manifest" href="https://pro.autojs.org/docs/manifest.webmanifest" crossorigin="use-credentials">
    <meta name="theme-color" content="#46bd87">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
    <title>dialogs - 对话框 | Auto.js Pro文档</title>
    <meta name="description" content="支持Node.js的自动化工作流JavaScript IDE">
    <style>
        :root {
            --bg-color: #fff;
        }

        html[data-theme="dark"] {
            --bg-color: #1d2025;
        }

        html,
        body {
            background-color: var(--bg-color);
        }
    </style>
    <script>
        const userMode = localStorage.getItem("vuepress-theme-hope-scheme");
        const systemDarkMode =
            window.matchMedia &&
            window.matchMedia("(prefers-color-scheme: dark)").matches;

        if (userMode === "dark" || (userMode !== "light" && systemDarkMode)) {
            document.querySelector("html").setAttribute("data-theme", "dark");
        }
    </script>
    <link rel="stylesheet" href="../../assets/style.ae9cb182.css">
    <link rel="modulepreload" href="../../assets/app.6aa2b576.js">
    <link rel="modulepreload" href="../../assets/dialogs.html.d5b23ee3.js">
    <link rel="modulepreload" href="../../assets/_plugin-vue_export-helper.cdc0426e.js">
    <link rel="modulepreload" href="../../assets/dialogs.html.71fb19d0.js">
</head>

<body>


    <!-- Copyright � 2008. Spidersoft Ltd -->
    <style>
        A.applink:hover {
            border: 2px dotted #DCE6F4;
            padding: 2px;
            background-color: #ffff00;
            color: green;
            text-decoration: none
        }

        A.applink {
            border: 2px dotted #DCE6F4;
            padding: 2px;
            color: #2F5BFF;
            background: transparent;
            text-decoration: none
        }

        A.info {
            color: #2F5BFF;
            background: transparent;
            text-decoration: none
        }

        A.info:hover {
            color: green;
            background: transparent;
            text-decoration: underline
        }
    </style>


    <div id="app"><!--[--><!--[--><!--[--><span tabindex="-1"></span><a href="#main-content"
            class="skip-link sr-only">Skip to content</a><!--]-->
        <div class="theme-container has-toc"><!--[--><!--[-->
            <header class="navbar">
                <div class="navbar-left"><button class="toggle-sidebar-button" title="Toggle Sidebar"><span
                            class="icon"></span></button><!----><a href="../../docs.html" class="brand"><img
                            class="logo" src="../../logo.png" alt="Auto.js Pro文档"><!----><span
                            class="site-name hide-in-pad">Auto.js Pro文档</span></a><!----></div>
                <div class="navbar-center"><!---->
                    <nav class="nav-links">
                        <div class="nav-item hide-in-mobile"><a href="../../docs.html" class="nav-link"
                                aria-label="Auto.js Pro"><span class="icon iconfont icon-home"></span>Auto.js
                                Pro<!----></a></div>
                        <div class="nav-item hide-in-mobile"><a href="../guide/guide.html" class="nav-link"
                                aria-label="指南"><span class="icon iconfont icon-creative"></span>指南<!----></a></div>
                        <div class="nav-item hide-in-mobile"><a href="v8.html" class="nav-link active"
                                aria-label="第一代API文档"><span class="icon iconfont icon-note"></span>第一代API文档<!----></a>
                        </div>
                        <div class="nav-item hide-in-mobile"><a href="../v9/v9.html" class="nav-link"
                                aria-label="第二代API文档"><span class="icon iconfont icon-note"></span>第二代API文档<!----></a>
                        </div>
                        <div class="nav-item hide-in-mobile">
                            <div class="dropdown-wrapper"><button class="dropdown-title" type="button"
                                    aria-label="官网与相关链接"><span class="title"><span
                                            class="icon iconfont icon-discover"></span>官网与相关链接</span><span
                                        class="arrow"></span>
                                    <ul class="nav-dropdown">
                                        <li class="dropdown-item"><a href="../../../pro.autojs.html"
                                                rel="noopener noreferrer" target="_blank" aria-label="官网与软件下载"
                                                class="nav-link"><!---->官网与软件下载<span><svg class="external-link-icon"
                                                        xmlns="http://www.w3.org/2000/svg" aria-hidden="true"
                                                        focusable="false" x="0px" y="0px" viewBox="0 0 100 100"
                                                        width="15" height="15">
                                                        <path fill="currentColor"
                                                            d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                                        </path>
                                                        <polygon fill="currentColor"
                                                            points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                                        </polygon>
                                                    </svg><span class="external-link-icon-sr-only">open in new
                                                        window</span></span><!----></a></li>
                                        <li class="dropdown-item"><a href="https://blog.autojs.org/"
                                                rel="noopener noreferrer" target="_blank" aria-label="官方博客"
                                                class="nav-link"><!---->官方博客<span><svg class="external-link-icon"
                                                        xmlns="http://www.w3.org/2000/svg" aria-hidden="true"
                                                        focusable="false" x="0px" y="0px" viewBox="0 0 100 100"
                                                        width="15" height="15">
                                                        <path fill="currentColor"
                                                            d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                                        </path>
                                                        <polygon fill="currentColor"
                                                            points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                                        </polygon>
                                                    </svg><span class="external-link-icon-sr-only">open in new
                                                        window</span></span><!----></a></li>
                                        <li class="dropdown-item"><a href="https://pd.qq.com/s/gosos5"
                                                rel="noopener noreferrer" target="_blank" aria-label="官方频道"
                                                class="nav-link"><!---->官方频道<span><svg class="external-link-icon"
                                                        xmlns="http://www.w3.org/2000/svg" aria-hidden="true"
                                                        focusable="false" x="0px" y="0px" viewBox="0 0 100 100"
                                                        width="15" height="15">
                                                        <path fill="currentColor"
                                                            d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                                        </path>
                                                        <polygon fill="currentColor"
                                                            points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                                        </polygon>
                                                    </svg><span class="external-link-icon-sr-only">open in new
                                                        window</span></span><!----></a></li>
                                    </ul>
                                </button></div>
                        </div>
                    </nav><!---->
                </div>
                <div class="navbar-right"><!---->
                    <div class="nav-item">
                        <div class="dropdown-wrapper i18n-dropdown"><button class="dropdown-title" type="button"
                                aria-label="选择语言"><!--[--><svg xmlns="http://www.w3.org/2000/svg" class="icon i18n-icon"
                                    viewBox="0 0 1024 1024" fill="currentColor" aria-label="i18n icon"
                                    style="width:1rem;height:1rem;vertical-align:middle;">
                                    <path
                                        d="M379.392 460.8 494.08 575.488l-42.496 102.4L307.2 532.48 138.24 701.44l-71.68-72.704L234.496 460.8l-45.056-45.056c-27.136-27.136-51.2-66.56-66.56-108.544h112.64c7.68 14.336 16.896 27.136 26.112 35.84l45.568 46.08 45.056-45.056C382.976 312.32 409.6 247.808 409.6 204.8H0V102.4h256V0h102.4v102.4h256v102.4H512c0 70.144-37.888 161.28-87.04 210.944L378.88 460.8zM576 870.4 512 1024H409.6l256-614.4H768l256 614.4H921.6l-64-153.6H576zM618.496 768h196.608L716.8 532.48 618.496 768z">
                                    </path>
                                </svg><!--]--><span class="arrow"></span>
                                <ul class="nav-dropdown">
                                    <li class="dropdown-item"><a href="../../en/en.html" class="nav-link"
                                            aria-label="English"><!---->English<!----></a></li>
                                    <li class="dropdown-item"><a aria-current="page" href="dialogs.html"
                                            class="router-link-active router-link-exact-active nav-link active"
                                            aria-label="简体中文"><!---->简体中文<!----></a></li>
                                </ul>
                            </button></div>
                    </div><!---->
                    <div class="nav-item hide-in-mobile"><button id="appearance-switch"><svg
                                xmlns="http://www.w3.org/2000/svg" class="icon auto-icon" viewBox="0 0 1024 1024"
                                fill="currentColor" aria-label="auto icon" style="display:block;">
                                <path
                                    d="M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm0-840c-198.78 0-360 161.22-360 360 0 198.84 161.22 360 360 360s360-161.16 360-360c0-198.78-161.22-360-360-360zm0 660V212c165.72 0 300 134.34 300 300 0 165.72-134.28 300-300 300z">
                                </path>
                            </svg><svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" viewBox="0 0 1024 1024"
                                fill="currentColor" aria-label="dark icon" style="display:none;">
                                <path
                                    d="M524.8 938.667h-4.267a439.893 439.893 0 0 1-313.173-134.4 446.293 446.293 0 0 1-11.093-597.334A432.213 432.213 0 0 1 366.933 90.027a42.667 42.667 0 0 1 45.227 9.386 42.667 42.667 0 0 1 10.24 42.667 358.4 358.4 0 0 0 82.773 375.893 361.387 361.387 0 0 0 376.747 82.774 42.667 42.667 0 0 1 54.187 55.04 433.493 433.493 0 0 1-99.84 154.88 438.613 438.613 0 0 1-311.467 128z">
                                </path>
                            </svg><svg xmlns="http://www.w3.org/2000/svg" class="icon light-icon"
                                viewBox="0 0 1024 1024" fill="currentColor" aria-label="light icon"
                                style="display:none;">
                                <path
                                    d="M952 552h-80a40 40 0 0 1 0-80h80a40 40 0 0 1 0 80zM801.88 280.08a41 41 0 0 1-57.96-57.96l57.96-58a41.04 41.04 0 0 1 58 58l-58 57.96zM512 752a240 240 0 1 1 0-480 240 240 0 0 1 0 480zm0-560a40 40 0 0 1-40-40V72a40 40 0 0 1 80 0v80a40 40 0 0 1-40 40zm-289.88 88.08-58-57.96a41.04 41.04 0 0 1 58-58l57.96 58a41 41 0 0 1-57.96 57.96zM192 512a40 40 0 0 1-40 40H72a40 40 0 0 1 0-80h80a40 40 0 0 1 40 40zm30.12 231.92a41 41 0 0 1 57.96 57.96l-57.96 58a41.04 41.04 0 0 1-58-58l58-57.96zM512 832a40 40 0 0 1 40 40v80a40 40 0 0 1-80 0v-80a40 40 0 0 1 40-40zm289.88-88.08 58 57.96a41.04 41.04 0 0 1-58 58l-57.96-58a41 41 0 0 1 57.96-57.96z">
                                </path>
                            </svg></button></div>
                    <div class="search-box" role="search" data-v-f3875574><input value="" aria-label="Search" class=""
                            placeholder="Search" autocomplete="off" spellcheck="false" data-v-f3875574><!----></div>
                    <!----><button class="toggle-navbar-button" aria-label="Toggle Navbar" aria-expanded="false"
                        aria-controls="nav-screen"><span class="button-container"><span class="button-top"></span><span
                                class="button-middle"></span><span class="button-bottom"></span></span></button>
                </div>
            </header><!----><!--]--><!---->
            <div class="toggle-sidebar-wrapper"><span class="arrow left"></span></div>
            <aside class="sidebar"><!--[--><!----><!--]-->
                <ul class="sidebar-links">
                    <li>
                        <section class="sidebar-group">
                            <p class="sidebar-heading"><!----><span class="title">指南</span><!----></p>
                            <ul class="sidebar-links">
                                <li><!--[--><a href="v8.html" class="nav-link sidebar-link sidebar-page"
                                        aria-label="阅读须知"><!---->阅读须知<!----></a>
                                    <ul class="sidebar-sub-headers"></ul><!--]-->
                                </li>
                            </ul>
                        </section>
                    </li>
                    <li>
                        <section class="sidebar-group">
                            <p class="sidebar-heading"><!----><span class="title">API文档</span><!----></p>
                            <ul class="sidebar-links">
                              <li>
                                <section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span
                                      class="title">自动化 -
                                      控件操作</span><span class="arrow down"></span></button>
                                  <ul class="sidebar-links">
                                    <li><!--[--><a href="./automator/"
                                        class="router-link-active router-link-exact-active nav-link sidebar-link sidebar-page"
                                        aria-label="入门介绍" aria-current="page"><!---->入门介绍<!----></a>
                                      <ul class="sidebar-sub-headers"></ul><!--]-->
                                    </li>
                                    <li><!--[--><a href="./automator/selector.html" class="nav-link sidebar-link sidebar-page"
                                        aria-label="选择器"><!---->选择器<!----></a>
                                      <ul class="sidebar-sub-headers"></ul><!--]-->
                                    </li>
                                    <li><!--[--><a href="./automator/uiobject.html" class="nav-link sidebar-link sidebar-page"
                                        aria-label="控件和控件集合"><!---->控件和控件集合<!----></a>
                                      <ul class="sidebar-sub-headers"></ul><!--]-->
                                    </li>
                                    <li><!--[--><a href="./automator/api.html" class="nav-link sidebar-link sidebar-page"
                                        aria-label="automator与其他函数"><!---->automator与其他函数<!----></a>
                                      <ul class="sidebar-sub-headers"></ul><!--]-->
                                    </li>
                                  </ul>
                                </section>
                              </li>
                              <li><!--[--><a href="./coordinatesBasedAutomation.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="自动化 - 坐标操作"><!---->自动化 -
                                  坐标操作<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./app.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="app - 应用"><!---->app -
                                  应用<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./base64.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="base64"><!---->base64<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./colors.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="colors - 颜色"><!---->colors - 颜色<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./canvas.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="canvas - 画布"><!---->canvas - 画布<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./console.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="console - 控制台"><!---->console - 控制台<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./crypto.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="crypto - 加解密与消息摘要"><!---->crypto - 加解密与消息摘要<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./debug.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="debug - 调试工具"><!---->debug - 调试工具<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./device.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="device - 设备"><!---->device - 设备<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./dialogs.html" class="nav-link sidebar-link sidebar-page active"
                                  aria-label="dialogs - 对话框"><!---->dialogs - 对话框<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./engines.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="engines - 脚本引擎"><!---->engines - 脚本引擎<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./events.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="events - 事件与监听"><!---->events - 事件与监听<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./floaty.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="floaty - 悬浮窗"><!---->floaty - 悬浮窗<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./files.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="files - 文件系统"><!---->files - 文件系统<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./globals.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="globals - 全局变量与函数"><!---->globals - 全局变量与函数<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./http.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="http - HTTP网络请求"><!---->http - HTTP网络请求<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./images.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="images - 图片处理"><!---->images - 图片处理<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./keys.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="keys - 按键模拟"><!---->keys
                                  - 按键模拟<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./media.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="media - 多媒体"><!---->media
                                  - 多媒体<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./modules.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="module - 模块"><!---->module - 模块<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./ocr.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="ocr - 文字识别"><!---->ocr -
                                  文字识别<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./plugins.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="plugins - 插件"><!---->plugins - 插件<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./powerManager.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="power_manager - 电源管理"><!---->power_manager - 电源管理<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./sensors.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="sensors - 传感器"><!---->sensors - 传感器<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./shell.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="shell - Shell命令"><!---->shell - Shell命令<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./storages.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="storages - 本地存储"><!---->storages - 本地存储<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./settings.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="settings - 设置"><!---->settings - 设置<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./threads.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="threads - 多线程"><!---->threads - 多线程<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./timers.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="timers - 定时器"><!---->timers - 定时器<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./timedTasks.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="work_manager - 定时与任务"><!---->work_manager - 定时与任务<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li>
                                <section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span
                                      class="title">ui - 用户界面</span><span class="arrow down"></span></button>
                                  <ul class="sidebar-links">
                                    <li><a href="/docs_bak/zh/v8/ui/ui.html" class="nav-link sidebar-link sidebar-page"
                                           aria-label="ui入门介绍"><!---->ui入门介绍<!----></a>
                                      <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li><a href="/docs_bak/zh/v8/ui/basic.html" class="nav-link sidebar-link sidebar-page"
                                           aria-label="基础布局与控件"><!---->基础布局与控件<!----></a>
                                      <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li><a href="/docs_bak/zh/v8/ui/advanced.html" class="nav-link sidebar-link sidebar-page"
                                           aria-label="其他布局与控件"><!---->其他布局与控件<!----></a>
                                      <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li><a href="/docs_bak/zh/v8/ui/api.html" class="nav-link sidebar-link sidebar-page"
                                           aria-label="api文档"><!---->api文档<!----></a>
                                      <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li><a href="/docs_bak/zh/v8/ui/customWidget.html" class="nav-link sidebar-link sidebar-page"
                                           aria-label="自定义控件"><!---->自定义控件<!----></a>
                                      <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li><a aria-current="page" href="/docs_bak/zh/v8/ui/webview.html"
                                        class="router-link-active router-link-exact-active nav-link sidebar-link sidebar-page"
                                        aria-label="使用Web编写界面"><!---->使用Web编写界面<!----></a>
                                      <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                  </ul>
                                </section>
                              </li>
                              <li><!--[--><a href="./util.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="util - 工具"><!---->util -
                                  工具<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./webSocket.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="WebSocket"><!---->WebSocket<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                              <li><!--[--><a href="./zip.html" class="nav-link sidebar-link sidebar-page"
                                  aria-label="zip - 压缩与解压"><!---->zip -
                                  压缩与解压<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                              </li>
                            </ul>
                          </section>
                    </li>
                    <li>
                        <section class="sidebar-group">
                            <p class="sidebar-heading"><!----><span class="title">进阶</span><!----></p>
                            <ul class="sidebar-links">
                                <li><!--[--><a href="scriptingJava.html" class="nav-link sidebar-link sidebar-page"
                                        aria-label="和Java交互"><!---->和Java交互<!----></a>
                                    <ul class="sidebar-sub-headers"></ul><!--]-->
                                </li>
                            </ul>
                        </section>
                    </li>
                </ul><!--[--><!----><!--]-->
            </aside><!--[-->
            <main class="page" id="main-content"><!--[--><!---->
                <nav class="breadcrumb disable"></nav>
                <div class="page-title">
                    <h1><!---->dialogs - 对话框</h1>
                    <div class="page-info"><span class="date-info" aria-label="写作日期📅" data-balloon-pos="down"><svg
                                xmlns="http://www.w3.org/2000/svg" class="icon calendar-icon" viewBox="0 0 1024 1024"
                                fill="currentColor" aria-label="calendar icon">
                                <path
                                    d="M716.4 110.137c0-18.753-14.72-33.473-33.472-33.473-18.753 0-33.473 14.72-33.473 33.473v33.473h66.993v-33.473zm-334.87 0c0-18.753-14.72-33.473-33.473-33.473s-33.52 14.72-33.52 33.473v33.473h66.993v-33.473zm468.81 33.52H716.4v100.465c0 18.753-14.72 33.473-33.472 33.473a33.145 33.145 0 01-33.473-33.473V143.657H381.53v100.465c0 18.753-14.72 33.473-33.473 33.473a33.145 33.145 0 01-33.473-33.473V143.657H180.6A134.314 134.314 0 0046.66 277.595v535.756A134.314 134.314 0 00180.6 947.289h669.74a134.36 134.36 0 00133.94-133.938V277.595a134.314 134.314 0 00-133.94-133.938zm33.473 267.877H147.126a33.145 33.145 0 01-33.473-33.473c0-18.752 14.72-33.473 33.473-33.473h736.687c18.752 0 33.472 14.72 33.472 33.473a33.145 33.145 0 01-33.472 33.473z">
                                </path>
                            </svg><span>2022年10月22日</span>
                            <meta property="datePublished" content="2022-10-22T07:36:15.000Z">
                        </span></div>
                    <hr>
                </div>
                <div class="toc-place-holder">
                    <aside id="toc">
                        <div class="toc-header">此页内容</div>
                        <div class="toc-wrapper">
                            <ul class="toc-list"><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-alert-title-content-callback"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.alert(title[,
                                        content, callback])</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-confirm-title-content-callback"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.confirm(title[,
                                        content, callback])</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-rawinput-title-prefill-callback"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.rawInput(title[,
                                        prefill, callback])</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-input-title-prefill-callback"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.input(title[,
                                        prefill, callback])</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-prompt-title-prefill-callback"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.prompt(title[,
                                        prefill, callback])</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-select-title-items-callback"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.select(title,
                                        items, callback)</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-singlechoice-title-items-index-callback"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.singleChoice(title,
                                        items[, index, callback])</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-multichoice-title-items-indices-callback"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.multiChoice(title,
                                        items[, indices, callback])</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialog-setdefaultdialogtype-type"
                                        class="router-link-active router-link-exact-active toc-link level2">dialog.setDefaultDialogType(type)</a>
                                </li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialogs-build-properties"
                                        class="router-link-active router-link-exact-active toc-link level2">dialogs.build(properties)</a>
                                </li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-show"
                                        class="router-link-active router-link-exact-active toc-link level2">事件: show</a>
                                </li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-cancel"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        cancel</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-dismiss"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        dismiss</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-positive"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        positive</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-negative"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        negative</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-neutral"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        neutral</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-any"
                                        class="router-link-active router-link-exact-active toc-link level2">事件: any</a>
                                </li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-item-select"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        item_select</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-single-choice"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        single_choice</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-multi-choice"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        multi_choice</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-input"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        input</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#事件-input-change"
                                        class="router-link-active router-link-exact-active toc-link level2">事件:
                                        input_change</a></li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialog-getprogress"
                                        class="router-link-active router-link-exact-active toc-link level2">dialog.getProgress()</a>
                                </li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialog-getmaxprogress"
                                        class="router-link-active router-link-exact-active toc-link level2">dialog.getMaxProgress()</a>
                                </li><!----><!--]--><!--[-->
                                <li class="toc-item"><a aria-current="page"
                                        href="https://pro.autojs.org/docs/zh/v8/dialogs.html#dialog-getactionbutton-action"
                                        class="router-link-active router-link-exact-active toc-link level2">dialog.getActionButton(action)</a>
                                </li><!----><!--]-->
                            </ul>
                        </div>
                    </aside>
                </div><!---->
                <div class="theme-hope-content">
                    <h1 id="dialogs-对话框" tabindex="-1"><a class="header-anchor" href="#dialogs-对话框"
                            aria-hidden="true">#</a> dialogs - 对话框</h1>
                    <blockquote>
                        <p>Stability: 2 - Stable</p>
                    </blockquote>
                    <p>dialogs 模块提供了简单的对话框支持，可以通过对话框和用户进行交互。最简单的例子如下：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;您好&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>这段代码会弹出一个消息提示框显示&quot;您好&quot;，并在用户点击&quot;确定&quot;后继续运行。稍微复杂一点的例子如下：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> clear <span class="token operator">=</span> <span class="token function">confirm</span><span class="token punctuation">(</span><span class="token string">&quot;要清除所有缓存吗?&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">if</span><span class="token punctuation">(</span>clear<span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;清除成功!&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p><code><span class="token function">confirm</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>会弹出一个对话框并让用户选择&quot;是&quot;或&quot;否&quot;，如果选择&quot;是&quot;则返回true。
                    </p>
                    <p>需要特别注意的是，对话框在ui模式下不能像通常那样使用，应该使用回调函数或者<a
                            href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise"
                            target="_blank" rel="noopener noreferrer">Promise<span><svg class="external-link-icon"
                                    xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px"
                                    y="0px" viewBox="0 0 100 100" width="15" height="15">
                                    <path fill="currentColor"
                                        d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                    </path>
                                    <polygon fill="currentColor"
                                        points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                    </polygon>
                                </svg><span class="external-link-icon-sr-only">open in new
                                    window</span></span></a>的形式。理解这一点可能稍有困难。举个例子:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token string">&quot;ui&quot;</span><span class="token punctuation">;</span>
<span class="token comment">//回调形式</span>
 <span class="token function">confirm</span><span class="token punctuation">(</span><span class="token string">&quot;要清除所有缓存吗?&quot;</span><span class="token punctuation">,</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">clear</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
     <span class="token keyword">if</span><span class="token punctuation">(</span>clear<span class="token punctuation">)</span><span class="token punctuation">{</span>
          <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;清除成功!&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
     <span class="token punctuation">}</span>
 <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//Promise形式</span>
<span class="token function">confirm</span><span class="token punctuation">(</span><span class="token string">&quot;要清除所有缓存吗?&quot;</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">clear</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
        <span class="token keyword">if</span><span class="token punctuation">(</span>clear<span class="token punctuation">)</span><span class="token punctuation">{</span>
          <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;清除成功!&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="dialogs-alert-title-content-callback" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-alert-title-content-callback" aria-hidden="true">#</a> dialogs.alert(title[,
                        content, callback])</h2>
                    <ul>
                        <li><code><span class="token property">title</span></code> {string} 对话框的标题。</li>
                        <li><code><span class="token property">content</span></code> {string} 可选，对话框的内容。默认为空。</li>
                        <li><code><span class="token property">callback</span></code> {Function}
                            回调函数，可选。当用户点击确定时被调用,一般用于ui模式。</li>
                    </ul>
                    <p>显示一个只包含“确定”按钮的提示对话框。直至用户点击确定脚本才继续运行。</p>
                    <p>该函数也可以作为全局函数使用。</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;出现错误~&quot;</span><span class="token punctuation">,</span> &quot;出现未知错误，请联系脚本作者”<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>在ui模式下该函数返回一个<code><span class="token property">Promise</span></code>。例如:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token string">&quot;ui&quot;</span><span class="token punctuation">;</span>
<span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;嘿嘿嘿&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token comment">//当点击确定后会执行这里</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="dialogs-confirm-title-content-callback" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-confirm-title-content-callback" aria-hidden="true">#</a>
                        dialogs.confirm(title[, content, callback])</h2>
                    <ul>
                        <li><code><span class="token property">title</span></code> {string} 对话框的标题。</li>
                        <li><code><span class="token property">content</span></code> {string} 可选，对话框的内容。默认为空。</li>
                        <li><code><span class="token property">callback</span></code> {Function}
                            回调函数，可选。当用户点击确定时被调用,一般用于ui模式。</li>
                    </ul>
                    <p>显示一个包含“确定”和“取消”按钮的提示对话框。如果用户点击“确定”则返回 <code><span class="token boolean">true</span></code> ，否则返回
                        <code><span class="token boolean">false</span></code> 。</p>
                    <p>该函数也可以作为全局函数使用。</p>
                    <p>在ui模式下该函数返回一个<code><span class="token property">Promise</span></code>。例如:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token string">&quot;ui&quot;</span><span class="token punctuation">;</span>
<span class="token function">confirm</span><span class="token punctuation">(</span><span class="token string">&quot;确定吗&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">value</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token comment">//当点击确定后会执行这里, value为true或false, 表示点击&quot;确定&quot;或&quot;取消&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="dialogs-rawinput-title-prefill-callback" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-rawinput-title-prefill-callback" aria-hidden="true">#</a>
                        dialogs.rawInput(title[, prefill, callback])</h2>
                    <ul>
                        <li><code><span class="token property">title</span></code> {string} 对话框的标题。</li>
                        <li><code><span class="token property">prefill</span></code> {string} 输入框的初始内容，可选，默认为空。</li>
                        <li><code><span class="token property">callback</span></code> {Function}
                            回调函数，可选。当用户点击确定时被调用,一般用于ui模式。</li>
                    </ul>
                    <p>显示一个包含输入框的对话框，等待用户输入内容，并在用户点击确定时将输入的字符串返回。如果用户取消了输入，返回null。</p>
                    <p>该函数也可以作为全局函数使用。</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> name <span class="token operator">=</span> <span class="token function">rawInput</span><span class="token punctuation">(</span><span class="token string">&quot;请输入您的名字&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;小明&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;您的名字是&quot;</span> <span class="token operator">+</span> name<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>在ui模式下该函数返回一个<code><span class="token property">Promise</span></code>。例如:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token string">&quot;ui&quot;</span><span class="token punctuation">;</span>
<span class="token function">rawInput</span><span class="token punctuation">(</span><span class="token string">&quot;请输入您的名字&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;小明&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">name</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;您的名字是&quot;</span> <span class="token operator">+</span> name<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>当然也可以使用回调函数，例如:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token function">rawInput</span><span class="token punctuation">(</span><span class="token string">&quot;请输入您的名字&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;小明&quot;</span><span class="token punctuation">,</span> <span class="token parameter">name</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
     <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;您的名字是&quot;</span> <span class="token operator">+</span> name<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="dialogs-input-title-prefill-callback" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-input-title-prefill-callback" aria-hidden="true">#</a> dialogs.input(title[,
                        prefill, callback])</h2>
                    <p>等效于
                        <code><span class="token function">eval</span><span class="token punctuation">(</span>dialogs<span class="token punctuation">.</span><span class="token function">rawInput</span><span class="token punctuation">(</span>title<span class="token punctuation">,</span> prefill<span class="token punctuation">,</span> callback<span class="token punctuation">)</span><span class="token punctuation">)</span></code>,
                        该函数和rawInput的区别在于，会把输入的字符串用eval计算一遍再返回，返回的可能不是字符串。</p>
                    <p>可以用该函数输入数字、数组等。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> age <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">input</span><span class="token punctuation">(</span><span class="token string">&quot;请输入您的年龄&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;18&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// new Date().getYear() + 1900 可获取当前年份</span>
<span class="token keyword">var</span> year <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Date</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getYear</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token number">1900</span> <span class="token operator">-</span> age<span class="token punctuation">;</span>
<span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;您的出生年份是&quot;</span> <span class="token operator">+</span> year<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>在ui模式下该函数返回一个<code><span class="token property">Promise</span></code>。例如:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token string">&quot;ui&quot;</span><span class="token punctuation">;</span>
dialogs<span class="token punctuation">.</span><span class="token function">input</span><span class="token punctuation">(</span><span class="token string">&quot;请输入您的年龄&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;18&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">age</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token keyword">var</span> year <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Date</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getYear</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token number">1900</span> <span class="token operator">-</span> age<span class="token punctuation">;</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;您的出生年份是&quot;</span> <span class="token operator">+</span> year<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="dialogs-prompt-title-prefill-callback" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-prompt-title-prefill-callback" aria-hidden="true">#</a>
                        dialogs.prompt(title[, prefill, callback])</h2>
                    <p>相当于
                        <code>dialogs<span class="token punctuation">.</span><span class="token function">rawInput</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>;
                    </p>
                    <h2 id="dialogs-select-title-items-callback" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-select-title-items-callback" aria-hidden="true">#</a> dialogs.select(title,
                        items, callback)</h2>
                    <ul>
                        <li><code><span class="token property">title</span></code> {string} 对话框的标题。</li>
                        <li><code><span class="token property">items</span></code> {Array} 对话框的选项列表，是一个字符串数组。</li>
                        <li><code><span class="token property">callback</span></code> {Function}
                            回调函数，可选。当用户点击确定时被调用,一般用于ui模式。</li>
                    </ul>
                    <p>显示一个带有选项列表的对话框，等待用户选择，返回用户选择的选项索引(0 ~ item.length - 1)。如果用户取消了选择，返回-1。</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> options <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">&quot;选项A&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项B&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项C&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项D&quot;</span><span class="token punctuation">]</span>
<span class="token keyword">var</span> i <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">select</span><span class="token punctuation">(</span><span class="token string">&quot;请选择一个选项&quot;</span><span class="token punctuation">,</span> options<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">if</span><span class="token punctuation">(</span>i <span class="token operator">&gt;=</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;您选择的是&quot;</span> <span class="token operator">+</span> options<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token keyword">else</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;您取消了选择&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>在ui模式下该函数返回一个<code><span class="token property">Promise</span></code>。例如:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token string">&quot;ui&quot;</span><span class="token punctuation">;</span>
dialogs<span class="token punctuation">.</span><span class="token function">select</span><span class="token punctuation">(</span><span class="token string">&quot;请选择一个选项&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">&quot;选项A&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项B&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项C&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项D&quot;</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">i</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
        <span class="token function">toast</span><span class="token punctuation">(</span>i<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="dialogs-singlechoice-title-items-index-callback" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-singlechoice-title-items-index-callback" aria-hidden="true">#</a>
                        dialogs.singleChoice(title, items[, index, callback])</h2>
                    <ul>
                        <li><code><span class="token property">title</span></code> {string} 对话框的标题。</li>
                        <li><code><span class="token property">items</span></code> {Array} 对话框的选项列表，是一个字符串数组。</li>
                        <li><code><span class="token property">index</span></code> {number} 对话框的初始选项的位置，默认为0。</li>
                        <li><code><span class="token property">callback</span></code> {Function}
                            回调函数，可选。当用户点击确定时被调用,一般用于ui模式。</li>
                    </ul>
                    <p>显示一个单选列表对话框，等待用户选择，返回用户选择的选项索引(0 ~ item.length - 1)。如果用户取消了选择，返回-1。</p>
                    <p>在ui模式下该函数返回一个<code><span class="token property">Promise</span></code>。</p>
                    <h2 id="dialogs-multichoice-title-items-indices-callback" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-multichoice-title-items-indices-callback" aria-hidden="true">#</a>
                        dialogs.multiChoice(title, items[, indices, callback])</h2>
                    <ul>
                        <li><code><span class="token property">title</span></code> {string} 对话框的标题。</li>
                        <li><code><span class="token property">items</span></code> {Array} 对话框的选项列表，是一个字符串数组。</li>
                        <li><code><span class="token property">indices</span></code> {Array} 选项列表中初始选中的项目索引的数组，默认为空数组。
                        </li>
                        <li><code><span class="token property">callback</span></code> {Function}
                            回调函数，可选。当用户点击确定时被调用,一般用于ui模式。</li>
                    </ul>
                    <p>显示一个多选列表对话框，等待用户选择，返回用户选择的选项索引的数组。如果用户取消了选择，返回<code><span class="token punctuation">[</span><span class="token punctuation">]</span></code>。
                    </p>
                    <p>在ui模式下该函数返回一个<code><span class="token property">Promise</span></code>。</p>
                    <h2 id="dialog-setdefaultdialogtype-type" tabindex="-1"><a class="header-anchor"
                            href="#dialog-setdefaultdialogtype-type" aria-hidden="true">#</a>
                        dialog.setDefaultDialogType(type)</h2>
                    <blockquote>
                        <p>** [<a href="../../../pro.autojs.html" target="_blank" rel="noopener noreferrer">Pro
                                8.8.5新增<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg"
                                        aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100"
                                        width="15" height="15">
                                        <path fill="currentColor"
                                            d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                        </path>
                                        <polygon fill="currentColor"
                                            points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                        </polygon>
                                    </svg><span class="external-link-icon-sr-only">open in new window</span></span></a>]
                            **</p>
                    </blockquote>
                    <ul>
                        <li><code><span class="token property">type</span></code> {string} 对话框类型</li>
                    </ul>
                    <p>设置默认的对话框类型，可选的值为：</p>
                    <ul>
                        <li><code><span class="token property">overlay</span></code> {string}
                            始终使用悬浮窗权限显示对话框，不管应用是否位于前台；没有悬浮窗权限时抛出异常</li>
                        <li><code><span class="token property">app</span></code> {string}
                            始终为应用内对话框，不管应用是否有界面存在以及界面是否位于前台；没有界面时抛出异常，有界面但位于后台仍然会弹出，但只有用户回到本应用才能看到。 需要注意的是，Auto.js
                            Pro的主界面（文件列表）和脚本进程不属于一个进程，因此不能在Auto.js Pro主界面等弹窗。</li>
                        <li><code>app<span class="token operator">-</span>or<span class="token operator">-</span>overlay</code>
                            {string} 如果本应用有界面存在，则显示为应用内对话框；位于后台仍然会弹出，但只有用户回到本应用才能看到。没有界面时使用悬浮窗权限弹出。</li>
                        <li><code>foreground<span class="token operator">-</span>or<span class="token operator">-</span>overlay</code>
                            {string} 本应用位于前台时，使用应用内悬浮窗；在后台时，用悬浮窗权限弹出。从而保证任何情况都能立即被用户看到。</li>
                    </ul>
                    <p>此函数影响所有由dialogs模块弹出的对话框。自定义对话框(<code>$dialogs<span class="token punctuation">.</span>build</code>)可以通过<code><span class="token property">type</span></code>属性覆盖。
                    </p>
                    <p>不执行此函数设置对话框类型时，默认为<code><span class="token property">overlay</span></code>类型（保持对之前版本的兼容）。</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token comment">// 设置所有对话框默认为自适应前台对话框，包括alert, $dialogs.build()等</span>
$dialogs<span class="token punctuation">.</span><span class="token function">setDefaultDialogType</span><span class="token punctuation">(</span><span class="token string">&quot;foreground-or-overlay&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">let</span> types <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">&#39;overlay&#39;</span><span class="token punctuation">,</span> <span class="token string">&#39;app&#39;</span><span class="token punctuation">,</span> <span class="token string">&#39;app-or-overlay&#39;</span><span class="token punctuation">,</span> <span class="token string">&#39;foreground-or-overlay&#39;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token keyword">let</span> i <span class="token operator">=</span> $dialogs<span class="token punctuation">.</span><span class="token function">select</span><span class="token punctuation">(</span><span class="token string">&#39;请选择对话框类型&#39;</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">&#39;悬浮窗对话框: overlay&#39;</span><span class="token punctuation">,</span> <span class="token string">&#39;应用内对话框: app&#39;</span><span class="token punctuation">,</span>
    <span class="token string">&#39;自适应对话框: app-or-overlay&#39;</span><span class="token punctuation">,</span> <span class="token string">&#39;自适应前台对话框: foreground-or-overlay&#39;</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">if</span> <span class="token punctuation">(</span>i <span class="token operator">&lt;</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">exit</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">let</span> type <span class="token operator">=</span> types<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&#39;选择的类型是&#39;</span> <span class="token operator">+</span> type <span class="token operator">+</span> <span class="token string">&#39;, 点击确定将在3秒后显示对话框&#39;</span><span class="token punctuation">,</span>
    <span class="token string">&#39;您可以在这3秒内执行返回、切换后台等动作测试对话框行为&#39;</span><span class="token punctuation">)</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="dialogs-build-properties" tabindex="-1"><a class="header-anchor"
                            href="#dialogs-build-properties" aria-hidden="true">#</a> dialogs.build(properties)</h2>
                    <ul>
                        <li><code><span class="token property">properties</span></code> {Object} 对话框属性，用于配置对话框。</li>
                        <li>返回 {Dialog}</li>
                    </ul>
                    <p>创建一个可自定义的对话框，例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token comment">//对话框标题</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;发现新版本&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">//对话框内容</span>
    <span class="token literal-property property">content</span><span class="token operator">:</span> <span class="token string">&quot;更新日志: 新增了若干了BUG&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">//确定键内容</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;下载&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">//取消键内容</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">//中性键内容</span>
    <span class="token literal-property property">neutral</span><span class="token operator">:</span> <span class="token string">&quot;到浏览器下载&quot;</span><span class="token punctuation">,</span>
    <span class="token comment">//勾选框内容</span>
    <span class="token literal-property property">checkBoxPrompt</span><span class="token operator">:</span> <span class="token string">&quot;不再提示&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;positive&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token comment">//监听确定键</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;开始下载....&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;neutral&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token comment">//监听中性键</span>
    app<span class="token punctuation">.</span><span class="token function">openUrl</span><span class="token punctuation">(</span><span class="token string">&quot;https://www.autojs.org&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;check&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">checked</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token comment">//监听勾选框</span>
    <span class="token function">log</span><span class="token punctuation">(</span>checked<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>选项properties可供配置的项目为:</p>
                    <ul>
                        <li><code><span class="token property">title</span></code> {string} 对话框标题</li>
                        <li><code><span class="token property">titleColor</span></code> {string} | {number} 对话框标题的颜色
                        </li>
                        <li><code><span class="token property">buttonRippleColor</span></code> {string} | {number}
                            对话框按钮的波纹效果颜色</li>
                        <li><code><span class="token property">icon</span></code> {string} | {Image} 对话框的图标，是一个URL或者图片对象
                        </li>
                        <li><code><span class="token property">content</span></code> {string} 对话框文字内容</li>
                        <li><code><span class="token property">contentColor</span></code>{string} | {number} 对话框文字内容的颜色
                        </li>
                        <li><code><span class="token property">contentLineSpacing</span></code>{number}
                            对话框文字内容的行高倍数，1.0为一倍行高</li>
                        <li><code><span class="token property">customView</span></code> {android.view.View}
                            对话框自定义内容View，可以使用ui.inflate从xml创建</li>
                        <li><code><span class="token property">items</span></code> {Array} 对话框列表的选项</li>
                        <li><code><span class="token property">itemsColor</span></code> {string} | {number}
                            对话框列表的选项的文字颜色</li>
                        <li><code><span class="token property">itemsSelectMode</span></code> {string} 对话框列表的选项选择模式，可以为:
                            <ul>
                                <li><code><span class="token property">select</span></code> 普通选择模式</li>
                                <li><code><span class="token property">single</span></code> 单选模式</li>
                                <li><code><span class="token property">multi</span></code> 多选模式</li>
                            </ul>
                        </li>
                        <li><code><span class="token property">itemsSelectedIndex</span></code> {number} | {Array}
                            对话框列表中预先选中的项目索引，如果是单选模式为一个索引；多选模式则为数组</li>
                        <li><code><span class="token property">positive</span></code> {string} 对话框确定按钮的文字内容(最右边按钮)</li>
                        <li><code><span class="token property">positiveColor</span></code> {string} | {number}
                            对话框确定按钮的文字颜色(最右边按钮)</li>
                        <li><code><span class="token property">neutral</span></code> {string} 对话框中立按钮的文字内容(最左边按钮)</li>
                        <li><code><span class="token property">neutralColor</span></code> {string} | {number}
                            对话框中立按钮的文字颜色(最左边按钮)</li>
                        <li><code><span class="token property">negative</span></code> {string} 对话框取消按钮的文字内容(确定按钮左边的按钮)
                        </li>
                        <li><code><span class="token property">negativeColor</span></code> {string} | {number}
                            对话框取消按钮的文字颜色(确定按钮左边的按钮)</li>
                        <li><code><span class="token property">checkBoxPrompt</span></code> {string} 勾选框文字内容</li>
                        <li><code><span class="token property">checkBoxChecked</span></code> {boolean} 勾选框是否勾选</li>
                        <li><code><span class="token property">progress</span></code> {Object} 配置对话框进度条的对象： <ul>
                                <li><code><span class="token property">max</span></code> {number}
                                    进度条的最大值，如果为-1则为无限循环的进度条</li>
                                <li><code><span class="token property">horizontal</span></code> {boolean} 如果为true,
                                    则对话框无限循环的进度条为水平进度条</li>
                                <li><code><span class="token property">showMinMax</span></code> {boolean}
                                    是否显示进度条的最大值和最小值</li>
                            </ul>
                        </li>
                        <li><code><span class="token property">cancelable</span></code> {boolean}
                            对话框是否可取消，如果为false，则对话框只能用代码手动取消</li>
                        <li><code><span class="token property">canceledOnTouchOutside</span></code> {boolean}
                            对话框是否在点击对话框以外区域时自动取消，默认为true</li>
                        <li><code><span class="token property">inputHint</span></code> {string} 对话框的输入框的输入提示</li>
                        <li><code><span class="token property">inputPrefill</span></code> {string} 对话框输入框的默认输入内容</li>
                        <li><code><span class="token property">type</span></code> {string}
                            对话框类型，参考<code>$dialogs<span class="token punctuation">.</span><span class="token function">setDefaultDialogType</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>函数的解释
                        </li>
                    </ul>
                    <p>通过这些选项可以自定义一个对话框，并通过监听返回的Dialog对象的按键、输入事件来实现交互。下面是一些例子。</p>
                    <p>模拟alert对话框：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;你好&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">content</span><span class="token operator">:</span> <span class="token string">&quot;今天也要元气满满哦&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;好的&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>模拟confirm对话框:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;你好&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">content</span><span class="token operator">:</span> <span class="token string">&quot;请问你是笨蛋吗?&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;是的&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;我是大笨蛋&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;positive&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;哈哈哈笨蛋&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;negative&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;哈哈哈大笨蛋&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>模拟单选框:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;单选&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">items</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">&quot;选项1&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项2&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项3&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;选项4&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token literal-property property">itemsSelectMode</span><span class="token operator">:</span> <span class="token string">&quot;single&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">itemsSelectedIndex</span><span class="token operator">:</span> <span class="token number">3</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;single_choice&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">index<span class="token punctuation">,</span> item</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;您选择的是&quot;</span> <span class="token operator">+</span> item<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>&quot;处理中&quot;对话框:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;下载中...&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">progress</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token literal-property property">max</span><span class="token operator">:</span> <span class="token operator">-</span><span class="token number">1</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token literal-property property">cancelable</span><span class="token operator">:</span> <span class="token boolean">false</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token function">setTimeout</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    d<span class="token punctuation">.</span><span class="token function">dismiss</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token number">3000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>输入对话框:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;请输入您的年龄&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">inputPrefill</span><span class="token operator">:</span> <span class="token string">&quot;18&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;input&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">input</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token keyword">var</span> age <span class="token operator">=</span> <span class="token function">parseInt</span><span class="token punctuation">(</span>input<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">toastLog</span><span class="token punctuation">(</span>age<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>使用这个函数来构造对话框，一个明显的不同是需要使用回调函数而不能像dialogs其他函数一样同步地返回结果；但也可以通过threads模块的方法来实现。例如显示一个输入框并获取输入结果为：
                    </p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> input <span class="token operator">=</span> threads<span class="token punctuation">.</span><span class="token function">disposable</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;请输入您的年龄&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">inputPrefill</span><span class="token operator">:</span> <span class="token string">&quot;18&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;input&quot;</span><span class="token punctuation">,</span> <span class="token parameter">text</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    input<span class="token punctuation">.</span><span class="token function">setAndNotify</span><span class="token punctuation">(</span>text<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">var</span> age <span class="token operator">=</span> <span class="token function">parseInt</span><span class="token punctuation">(</span>input<span class="token punctuation">.</span><span class="token function">blockedGet</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">toastLog</span><span class="token punctuation">(</span>age<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h1 id="dialog" tabindex="-1"><a class="header-anchor" href="#dialog" aria-hidden="true">#</a>
                        Dialog</h1>
                    <p><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>返回的对话框对象，内置一些事件用于响应用户的交互，也可以获取对话框的状态和信息。
                    </p>
                    <h2 id="事件-show" tabindex="-1"><a class="header-anchor" href="#事件-show" aria-hidden="true">#</a> 事件:
                        <code><span class="token property">show</span></code></h2>
                    <ul>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>对话框显示时会触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;标题&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;show&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;对话框显示了&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-cancel" tabindex="-1"><a class="header-anchor" href="#事件-cancel" aria-hidden="true">#</a>
                        事件: <code><span class="token property">cancel</span></code></h2>
                    <ul>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>对话框被取消时会触发的事件。一个对话框可能按取消按钮、返回键取消或者点击对话框以外区域取消。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;标题&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;cancel&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;对话框取消了&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-dismiss" tabindex="-1"><a class="header-anchor" href="#事件-dismiss"
                            aria-hidden="true">#</a> 事件: <code><span class="token property">dismiss</span></code></h2>
                    <ul>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>对话框消失时会触发的事件。对话框被取消或者手动调用<code>dialog<span class="token punctuation">.</span><span class="token function">dismiss</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>函数都会触发该事件。例如：
                    </p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;标题&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;dismiss&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;对话框消失了&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token function">setTimeout</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    d<span class="token punctuation">.</span><span class="token function">dismiss</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token number">5000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-positive" tabindex="-1"><a class="header-anchor" href="#事件-positive"
                            aria-hidden="true">#</a> 事件: <code><span class="token property">positive</span></code></h2>
                    <ul>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>确定按钮按下时触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;标题&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;positive&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;你点击了确定&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-negative" tabindex="-1"><a class="header-anchor" href="#事件-negative"
                            aria-hidden="true">#</a> 事件: <code><span class="token property">negative</span></code></h2>
                    <ul>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>取消按钮按下时触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;标题&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;negative&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;你点击了取消&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-neutral" tabindex="-1"><a class="header-anchor" href="#事件-neutral"
                            aria-hidden="true">#</a> 事件: <code><span class="token property">neutral</span></code></h2>
                    <ul>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>中性按钮按下时触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;标题&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">neutral</span><span class="token operator">:</span> <span class="token string">&quot;稍后提示&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;positive&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;你点击了稍后提示&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-any" tabindex="-1"><a class="header-anchor" href="#事件-any" aria-hidden="true">#</a> 事件:
                        <code><span class="token property">any</span></code></h2>
                    <ul>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                        <li><code><span class="token property">action</span></code> {string} 被点击的按钮，可能的值为: <ul>
                                <li><code><span class="token property">positive</span></code> 确定按钮</li>
                                <li><code><span class="token property">negative</span></code> 取消按钮</li>
                                <li><code><span class="token property">neutral</span></code> 中性按钮</li>
                            </ul>
                        </li>
                    </ul>
                    <p>任意按钮按下时触发的事件。例如:</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;标题&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">neutral</span><span class="token operator">:</span> <span class="token string">&quot;稍后提示&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;any&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">action<span class="token punctuation">,</span> dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span>action <span class="token operator">==</span> <span class="token string">&quot;positive&quot;</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;你点击了确定&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token keyword">else</span> <span class="token keyword">if</span><span class="token punctuation">(</span>action <span class="token operator">==</span> <span class="token string">&quot;negative&quot;</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;你点击了取消&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-item-select" tabindex="-1"><a class="header-anchor" href="#事件-item-select"
                            aria-hidden="true">#</a> 事件: <code><span class="token property">item_select</span></code>
                    </h2>
                    <ul>
                        <li><code><span class="token property">index</span></code> {number} 被选中的项目索引，从0开始</li>
                        <li><code><span class="token property">item</span></code> {Object} 被选中的项目</li>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>对话框列表(itemsSelectMode为&quot;select&quot;)的项目被点击选中时触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;请选择&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">items</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">&quot;A&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;B&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;C&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;D&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token literal-property property">itemsSelectMode</span><span class="token operator">:</span> <span class="token string">&quot;select&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;item_select&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">index<span class="token punctuation">,</span> item<span class="token punctuation">,</span> dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;您选择的是第&quot;</span> <span class="token operator">+</span> <span class="token punctuation">(</span>index <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token string">&quot;项, 选项为&quot;</span> <span class="token operator">+</span> item<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-single-choice" tabindex="-1"><a class="header-anchor" href="#事件-single-choice"
                            aria-hidden="true">#</a> 事件: <code><span class="token property">single_choice</span></code>
                    </h2>
                    <ul>
                        <li><code><span class="token property">index</span></code> {number} 被选中的项目索引，从0开始</li>
                        <li><code><span class="token property">item</span></code> {Object} 被选中的项目</li>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>对话框单选列表(itemsSelectMode为&quot;singleChoice&quot;)的项目被选中并点击确定时触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;请选择&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">items</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">&quot;A&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;B&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;C&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;D&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token literal-property property">itemsSelectMode</span><span class="token operator">:</span> <span class="token string">&quot;singleChoice&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;item_select&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">index<span class="token punctuation">,</span> item<span class="token punctuation">,</span> dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;您选择的是第&quot;</span> <span class="token operator">+</span> <span class="token punctuation">(</span>index <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token string">&quot;项, 选项为&quot;</span> <span class="token operator">+</span> item<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-multi-choice" tabindex="-1"><a class="header-anchor" href="#事件-multi-choice"
                            aria-hidden="true">#</a> 事件: <code><span class="token property">multi_choice</span></code>
                    </h2>
                    <ul>
                        <li><code><span class="token property">indices</span></code> {Array} 被选中的项目的索引的数组</li>
                        <li><code><span class="token property">items</span></code> {Array} 被选中的项目的数组</li>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>对话框多选列表(itemsSelectMode为&quot;multiChoice&quot;)的项目被选中并点击确定时触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code><span class="token keyword">var</span> d <span class="token operator">=</span> dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;请选择&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">items</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">&quot;A&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;B&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;C&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;D&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token literal-property property">itemsSelectMode</span><span class="token operator">:</span> <span class="token string">&quot;multiChoice&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;item_select&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">indices<span class="token punctuation">,</span> items<span class="token punctuation">,</span> dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span>util<span class="token punctuation">.</span><span class="token function">format</span><span class="token punctuation">(</span><span class="token string">&quot;您选择的项目为%o, 选项为%o&quot;</span><span class="token punctuation">,</span> indices<span class="token punctuation">,</span> items<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-input" tabindex="-1"><a class="header-anchor" href="#事件-input" aria-hidden="true">#</a>
                        事件: <code><span class="token property">input</span></code></h2>
                    <ul>
                        <li><code><span class="token property">text</span></code> {string} 输入框的内容</li>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>带有输入框的对话框当点击确定时会触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;请输入&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">inputPrefill</span><span class="token operator">:</span> <span class="token string">&quot;&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;input&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">text<span class="token punctuation">,</span> dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;你输入的是&quot;</span> <span class="token operator">+</span> text<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="事件-input-change" tabindex="-1"><a class="header-anchor" href="#事件-input-change"
                            aria-hidden="true">#</a> 事件: <code><span class="token property">input_change</span></code>
                    </h2>
                    <ul>
                        <li><code><span class="token property">text</span></code> {string} 输入框的内容</li>
                        <li><code><span class="token property">dialog</span></code> {Dialog} 对话框</li>
                    </ul>
                    <p>对话框的输入框的文本发生变化时会触发的事件。例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode">
                        <pre class="language-javascript"><code>dialogs<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
    <span class="token literal-property property">title</span><span class="token operator">:</span> <span class="token string">&quot;请输入&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">positive</span><span class="token operator">:</span> <span class="token string">&quot;确定&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">negative</span><span class="token operator">:</span> <span class="token string">&quot;取消&quot;</span><span class="token punctuation">,</span>
    <span class="token literal-property property">inputPrefill</span><span class="token operator">:</span> <span class="token string">&quot;&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">&quot;input_change&quot;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">text<span class="token punctuation">,</span> dialog</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{</span>
    <span class="token function">toast</span><span class="token punctuation">(</span><span class="token string">&quot;你输入的是&quot;</span> <span class="token operator">+</span> text<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">show</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="dialog-getprogress" tabindex="-1"><a class="header-anchor" href="#dialog-getprogress"
                            aria-hidden="true">#</a> dialog.getProgress()</h2>
                    <ul>
                        <li>返回 {number}</li>
                    </ul>
                    <p>获取当前进度条的进度值，是一个整数</p>
                    <h2 id="dialog-getmaxprogress" tabindex="-1"><a class="header-anchor" href="#dialog-getmaxprogress"
                            aria-hidden="true">#</a> dialog.getMaxProgress()</h2>
                    <ul>
                        <li>返回 {number}</li>
                    </ul>
                    <p>获取当前进度条的最大进度值，是一个整数</p>
                    <h2 id="dialog-getactionbutton-action" tabindex="-1"><a class="header-anchor"
                            href="#dialog-getactionbutton-action" aria-hidden="true">#</a>
                        dialog.getActionButton(action)</h2>
                    <ul>
                        <li><code><span class="token property">action</span></code> {string} 动作，包括: <ul>
                                <li><code><span class="token property">positive</span></code></li>
                                <li><code><span class="token property">negative</span></code></li>
                                <li><code><span class="token property">neutral</span></code></li>
                            </ul>
                        </li>
                    </ul>
                </div><!---->
                <footer class="page-meta"><!---->
                    <div class="meta-item update-time"><span class="label">上次编辑于: </span><!----></div>
                    <div class="meta-item contributors"><span class="label">贡献者: </span><!--[--><!--[--><span
                            class="contributor" title="email: 946994919@qq.com">hyb1996</span><!--]--><!--]--></div>
                </footer>
                <nav class="page-nav"><a href="device.html" class="nav-link prev" aria-label="device - 设备">
                        <div class="hint"><span class="arrow left"></span>上一页</div>
                        <div class="link"><!---->device - 设备</div>
                    </a><a href="engines.html" class="nav-link next" aria-label="engines - 脚本引擎">
                        <div class="hint">下一页<span class="arrow right"></span></div>
                        <div class="link">engines - 脚本引擎<!----></div>
                    </a></nav><!----><!----><!--]-->
            </main><!--]--><!----><!--]-->
        </div><!--]--><!----><!----><!--]-->
    </div>
    <script type="module" src="../../assets/app.6aa2b576.js" defer></script>
</body>

</html>